/*
 * Copyright 2011 The Rusted Roof, LLC.
 *
 *    Licensed under the Apache License, Version 2.0 (the "License");
 *    you may not use this file except in compliance with the License.
 *    You may obtain a copy of the License at
 *
 *        http://www.apache.org/licenses/LICENSE-2.0
 *
 *    Unless required by applicable law or agreed to in writing, software
 *    distributed under the License is distributed on an "AS IS" BASIS,
 *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *    See the License for the specific language governing permissions and
 *    limitations under the License.
 */

package org.proteusframework.platformservice;

import org.proteusframework.core.api.IRuntimeEngine;

/**
 * Specialized type of an {@link IRuntimeEngine} that depicts a platform service engine. Platform service engines
 * expressly provide application-wide services that are intrinsically integrated into the Proteus Framework itself.
 *
 * @see IServicePlugin
 */
public interface IExtendedRuntimeEngine extends IRuntimeEngine
{
    /**
     * Access the extended runtime configuration that defines the execution strategy for the engine, including support
     * for the Proteus Platform Services.
     *
     * @return Extended runtime configuration
     */
    IExtendedRuntimeConfiguration getExtendedRuntimeConfiguration();

    /**
     * Notification to the runtime engine that one of the bootstrap platform services defined in /proteus.properties
     * was unable to initialize properly. The application can determine if it can continue without the bootstrap
     * platform service, or exit with a System.exit() call.
     *
     * @param e service initialization exception
     */
    void onCustomPlatformServiceInitializationException(ServiceInitializationException e);
}
